package com.mia.props.common.entities;

import com.mia.props.common.TileProps;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public class TileShowerHandles extends TileProps {
   public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float var7, float var8, float var9) {
      if (this.worldObj.isRemote) {
         return true;
      } else {
         for(int i = 1; i <= 3; ++i) {
            TileEntity te = world.getTileEntity(x, y + i, z);
            if (te instanceof TileShowerHead) {
               ((TileShowerHead)te).switchIsRunning();
               return true;
            }
         }

         return true;
      }
   }
}
